package com.xxx.test2;

import java.io.IOException;

public class ExceptionRaised {
	 
	public int calculate(int operand1, int operand2)throws Exception {
		
		int result = 0 ;
		
	 
		       result = operand1 / operand2;
		       
		     if(result>100000000){
		    	 
		    	 throw new NullPointerException();
		     }
		 
		return result;
	}
	
	public void test() throws Exception{
		
		calculate(9,0);
	}
	

	public static void main(String[] args) {
		
		ExceptionRaised obj = new ExceptionRaised();
		 
	  	
	    try {
			obj.test();
			
		} catch (Exception e) {


			e.printStackTrace();
		}
			
	 

	
	}
}
